package com.five.api;


import com.five.pojo.NovelCategory;
import com.five.result.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@FeignClient(name = "user-service", path = "/user/novelCategory", contextId = "novelCategoryServiceAPI")
public interface NovelCategoryServiceApi {



    /*
     * 根据男女类型分页查询
     * */
    @PostMapping("/queryByType")
    public Result queryByType(@RequestBody Long type);


    /*
     * 查询小说分类树
     * */
    @PostMapping("/novelCategoryTree")
    public Result tree(@RequestBody Long type);



    /*
     * 添加小说分类
     */
    @PostMapping("/add")
    public Result add(@RequestBody NovelCategory novelCategory);

    /*
     * 更新小说分类
     */
    @PostMapping("/update")
    public Result update(@RequestBody NovelCategory novelCategory);

    /*
     * 删除小说分类
     */
    @PostMapping("/delete/{id}")
    public Result delete(@PathVariable Long id);


    /*
     * 批量删除小说分类
     */
    @PostMapping("/deleteBatch")
    public Result deleteBatch(@RequestBody List<Long> ids);


    /*
     * 根据ID查询小说分类
     */
    @PostMapping("/queryById")
    public Result queryById(@RequestBody Long id) ;

    /*
     * 查询所有小说分类
     */
    @PostMapping("/queryAll")
    public Result queryAll();


    /*
     * 分页查询小说分类
     */
    @PostMapping("/queryPage")
    public Result queryPage(@RequestBody NovelCategory novelCategory);


}
